feat: v2.2 API surface — retrieveTrace, processFromUrl, deprecate error field#111
Merged
Conversation
… error field
- ScaniiTraceResult model (resourceId, List<ScaniiTraceEvent>) wired into JSON parser
- retrieveTrace(String id): GET /v2.2/files/{id}/trace, returns Optional<ScaniiTraceResult>
- processFromUrl(URI location): POST /v2.2/files with location multipart field, returns ScaniiProcessingResult
- ScaniiProcessingResult.getError/setError deprecated since 8.1.0
- Three integration tests: testRetrieveTrace, testRetrieveTraceUnknownId, testProcessFromUrl
- pom.xml bumped to 8.1.0; README and CHANGELOG updated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ne before publish Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
retrieveTrace(String id)→Optional<ScaniiTraceResult>: callsGET /v2.2/files/{id}/trace, returns empty on 404. Preview endpoint per v2.2 spec.processFromUrl(URI location)/processFromUrl(URI location, Map<String,String> metadata): submits a remote URL for synchronous processing viaPOST /v2.2/fileswith alocationmultipart text field.ScaniiTraceResultmodel with innerScaniiTraceEvent(timestamp, message); wired into the custom JSON parser.ScaniiProcessingResult.getError()/setError()(@Deprecated(since = "8.1.0")); will be removed in a future major version.Test plan
testRetrieveTrace— process a file, retrieve its trace, assert ≥1 event with non-null timestamp and messagetestRetrieveTraceUnknownId— assertretrieveTrace("doesnotexist")returnsOptional.empty()testProcessFromUrl— submithttp://localhost:4000/static/eicar.txt, assert 201 + non-null id🤖 Generated with Claude Code